package com.example.app.components


import androidx.compose.material.CircularProgressIndicator
import androidx.compose.material.LinearProgressIndicator
import androidx.compose.runtime.Composable
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.tooling.preview.Preview

@Composable
fun ProgressSample() {
    // 圆型进度条
    // progress 进度,取值0-1, 有progress之后就不会滚动了
//    CircularProgressIndicator(
//        color = Color.Red,
//        progress = 0.9f
//    )
    // 前景色和背景色都可以设置
    LinearProgressIndicator(
        color = Color.Red,
        progress = 0.8f,
        backgroundColor = Color.Blue
    )
}

@Preview
@Composable
fun ProgressSamplePreview() {
    ProgressSample()
}

